#define  _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
int main()
{
	int a, b, t;
	int c = rand() % 2;
	int answer = 0;
	int result = 0;
	char op;
	srand((unsigned int)time(NULL));
	a = rand() % 100 + 1;
	b = rand() % 100 + 1;
	if (a < b)
	{
		t = a;
		a = b;
		b = t;
	}
	if (c == 0)
		op = '+';
	else
		op = '-';
	printf("%d%c%d=", a, op, b);
	scanf("%d", &answer);
	if (op == '+')
		result = a + b;
	else
		result = a - b;
	if (answer == result)
		printf("correct\n");
	else
		printf("wrong\n");
	printf("result=%d\n", result);
	return 0;

}